Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow fetching previously built artifacts from S3 #43

Closed
wants to merge 2 commits into from

Conversation

pzakha
Copy link
Contributor

@pzakha pzakha commented Jul 2, 2019

DESCRIPTION

This gives us the ability to fetch artifacts for some packages from a previous build.

When we do so is dictated by the REUSE_CACHED_ARTIFACTS policy, which can have 3 possible values:

  • "never": never re-use artifacts from previous builds. This is the default setting.
  • "on-failure": build all packages as usual. If a package fails to build, then fetch it from a previous build.
  • "always": fetch all packages from a previous build.

Note that if we pass custom parameters for a package (e.g. provide a custom git url or branch), then we will never re-use artifacts from a previous build.

The "previous build" URL will be passed by Jenkins (devops-gate change to be posted soon) and is the latest post-push build.

Note that linux-pkg will not attempt to compare the hash of previous packages to determine whether or not it should be rebuilt, nor will it care if linux-pkg itself has changed. This simplifies the logic a lot but puts the burden or determining when it is safe to use each setting on the developer that tests the changes.

MOTIVATION

We've had intermittent external dependency errors such as #20 and #7 that prevent developers from testing their changes in other packages. This helps developers to avoid being affected by those errors unless they are making changes to the affected packages.

This will also give the ability to manually launch a post-push job with the "on-failure" setting, to avoid blocking teams that are waiting on some changes to be rolled-out.

By default, git-ab-pre-push will set the "on-failure" setting. As a bonus, we also have the "always" setting, which significantly speeds-up builds. We may decide to use this as the default setting if we deem it safe enough. In any case, we will add an option to pass this setting to git-ab-pre-push.

TODO

  • Add new parameters to documentation

FOLLOW-UP WORK

  • Changes to linux-pkg-build and ab-orchestrator jenkins jobs (tested already, will post soon)
  • Changes to git-ab-pre-push (TODO)

TESTING

fixes #27

@pzakha
Copy link
Contributor Author

pzakha commented Jul 2, 2019

cc: @prakashsurya @sebroy @jgallag88

@pzakha
Copy link
Contributor Author

pzakha commented Feb 13, 2020

Closing this as the main issue was mitigated by #57.

If we decide to revisit this, we should open a new PR.

@pzakha pzakha closed this Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow re-using previously built packages if no changes were detected
1 participant